package xyz.weizhi.service;

import org.junit.Test;
import org.junit.runner.RunWith;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import xyz.weizhi.config.springConfig;

import xyz.weizhi.domain.book;

import java.util.List;


/**
 * @Author milian
 * @Date 2021/9/15 0015 10:23
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = springConfig.class)
public class Mytest {
    @Autowired
    private bookService bookService;
    @Test
    public void test1(){

        List<book> books = bookService.selectAllBook();
        for (book book : books) {
            System.out.println(book);
        }
    }

}
